class Publisher(object):
    """producer of rabbitmq
    publish message to rabbitmq when calling `publish_message`
    refer to http://pika.readthedocs.io/en/0.10.0/examples/asynchronous_publisher_example.html
    """
    def __init__(self):
        # ...
        self.connect()

    def connect(self):
        self._connection = adapters.TornadoConnection(pika.URLParameters(self._url),
                                          self.on_connection_open)

    def on_connection_open(self, unused_connection):
        pass

    # def ...

    def publish_message(self, message):
        """publish message to rabbitmq
        """
        pass